package java_test.io_test;

import java.io.Serializable;

public class Person implements Serializable {
    private String name;
    private int age;
    // serialVersionUID 序列化的版本号，凡是实现Serializable接口的类都会有一个表示序列化版本标识符的静态变量
    static final long serialVersionUID = 12345554L;

    public Person() {
    }

    public Person(String name, int age) {
        super();
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person [name=" + name + ", age=" + age + "]";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}